package sample4;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

public class MyFrame extends JFrame {
	private final int WIDTH = 600;
	private final int HEIGHT = 400;

	public MyFrame() {
		setSize(WIDTH, HEIGHT);
		setTitle("Deneme");
		addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				super.windowClosing(e);
				System.out.println("kapaniyor..");
				System.exit(NORMAL);
			}
		});
	}
}
